package ru.st.selenium;


import org.testng.annotations.*;
import static org.junit.Assert.*;
import ru.st.selenium.model.Film;


public class AddFilm extends ru.st.selenium.pages.TestBase {

@Test
public void filmAddOK() throws Exception {
        app.getUserHelper().loginAs(USER);
        Film film = new Film().setTitle("Fox training").setYear("1984").setCountry("Boundless forest open spaces").setCast("Real fox ^^");
        app.getFilmHelper().create(film);
        assertTrue(app.getFilmHelper().isCreated());
        app.getUserHelper().logout();
       }

       
@Test
public void filmNoCreateNoTitle()  {
        app.getUserHelper().loginAs(USER);
        Film film = new Film().setYear("1984").setYear("1984").setCountry("Boundless forest open spaces").setCast("Real fox ^^");
        app.getFilmHelper().create(film);
    assertTrue(app.getFilmHelper().isNotCreated());
        app.getUserHelper().logout();
       }
       
}
